package com.apac.dao;

import java.util.ArrayList;
import java.util.List;

import com.apac.bom.AbstractBOM;
import com.apac.bom.TestObject;
import com.apac.wrappers.AbstractWrapper;

public class TestDao extends AbstractDAO {

	public static ArrayList<TestObject> testObjects;
	
	static {
		testObjects = new ArrayList<TestObject>();
		
		for(int i=0; i<10; i++){
			testObjects.add(new TestObject(i, "att1: "+i, "att2: "+i, true));
		}
	}
	
	public ArrayList<TestObject> retrieveAll() {
		// TODO Auto-generated method stub
		
//		CriteriaBuilder cb = em.getCriteriaBuilder();
//		CriteriaQuery<AbstractBOM> criteria = cb.createQuery(AbstractBOM.class);
//		Root<AbstractBOM> root = criteria.from(AbstractBOM.class);
//		criteria.select(root);
//		TypedQuery<AbstractBOM> tquery = em.createQuery(criteria);
//		List<AbstractBOM> objects = tquery.getResultList();
//		return objects;
		
		return testObjects;
		
	}

	public TestObject retrieveByPrimaryKey(int key) {
		// TODO Auto-generated method stub
		
//		AbstractBOM object = em.find(AbstractBOM.class, key);
//		return object;
		
		return null;
	}

	@Override
	public AbstractBOM findByKey(String id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<AbstractBOM> findAll() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public boolean update(AbstractBOM entity) {
		return false;
		// TODO Auto-generated method stub
		
	}

	@Override
	public boolean delete(AbstractBOM entity) {
		return false;
		// TODO Auto-generated method stub
		
	}

}
